﻿using Appliaction.Dto.Base_Manage;
using Domain.Entitys.Base_Manage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Base_Manage
{
    public interface IDeptService
    {
        /// <summary>
        /// 根据部门名称和负责人分页查询信息
        /// </summary>
        /// <param name="dept_name"></param>
        /// <param name="leader"></param>
        /// <returns></returns>
        List<Sys_Dept> GetDepts(string dept_name, string leader, int currentPage, int pageSize);
        /// <summary>
        /// 根据部门名称和负责人分页查询总个数
        /// </summary>
        /// <param name="dept_name"></param>
        /// <param name="leader"></param>
        /// <returns></returns>
        int GetDeptsCount(string dept_name, string leader);
        /// <summary>
        /// 查询全部部门
        /// </summary>
        /// <returns></returns>
        Task<List<Sys_Dept>> DeptOptAsync();
        /// <summary>
        /// 添加部门信息
        /// </summary>
        /// <param name="dept"></param>
        /// <returns></returns>
        Task<int> DeptAddAsync(DeptAddDto deptAddDto);

        /// <summary>
        /// 修改部门信息
        /// </summary>
        /// <param name="dept"></param>
        /// <returns></returns>
        Task<int> DeptUpdateAsync(DeptUpdateDto deptUpdateDto);
        /// <summary>
        /// 逻辑删除部门信息
        /// </summary>
        /// <param name="dept_id"></param>
        /// <param name="del"></param>
        /// <returns></returns>
        Task<int> DeptDeleteAsync(DeptDelDto deptDelDto);

        /// <summary>
        /// 查询部门信息及其子级部门
        /// </summary>
        /// <returns></returns>
        List<Sys_Dept_Trees> Get_Dept_Trees(string name);
    }
}
